Namespace - LJCNetCommon
Parameters
text - The next append value.
addIndent - Indicates if the text can be indented.
allowNewLine - Indicates if a new line can be added.
Returns
The potentially indented and wrapped new text value.
Syntax
C# |
public String Text(String text, Boolean addIndent = True, Boolean allowNewLine = True)
|
Adds modified text to the builder.
Remarks
Text() is an "Append" method. It creates the text with GetText() and adds
it to the builder.
Note: One should set the "addIndent" parameter to false when adding text
to the builder after getting the text with a "GetText" method. This is
because the the indent has already been added with the "GetText"
method.
Example
C# |
var tb = new TextBuilder();
tb.Text("This is an appended line.");
tb.AddIndent();
tb.Text("This is an indented line.");
var result = tb.ToString();
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.